<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>函数测试</title>
		<script>
			function showHell2(c)
			{
				for(var i=1;i<=c;i++)
				{
					document.write("<h1>hello ,javascript</h1>");
				}
			}
			function showHello()
			{
				alert("hello ,js");
			}
			function add(a,b)
			{
				return a+b;
				
			}
			var r1=add(4,5);
			alert(r1);
			var r2=add("java","script");
			alert(r2);
		</script>
	</head>
	<body>
		<div onclick="showHello()">
			we change lives!
		</div>
		<input type="button" value="show hello" onclick='showHell2(prompt("请输入要显示的次数","1"))'/>
	</body>
</html>
